CC=gcc
C0LIBDIR=/afs/andrew/course/15/122/lib32
C0RUNTIMEDIR=/afs/andrew/course/15/122/runtime

# always rebuild these
.PHONY: c0vm c0vmd

c0vm: c0vm.c
	$(CC) -m32 -ftrapv -Wall -Wextra -Werror -std=c99 -pedantic -g -L$(C0LIBDIR) -L$(C0RUNTIMEDIR) -Wl,-rpath $(C0LIBDIR) -Wl,-rpath $(C0RUNTIMEDIR) -lfile -lconio -lstring -lparse -largs -lcurses -lbare -o c0vm xalloc.c stacks.c readfile.c read_program.c c0vm.c c0vm_natives.c c0vm_main.c

c0vmd: c0vm.c
	$(MAKE) c0vm CC='gcc -DDEBUG'
